<template>
  <el-menu mode="horizontal">
    <el-menu-item index="0">
      <b>路由基础</b>
    </el-menu-item>
    <el-sub-menu index="1">
        <template #title>用户</template>
        <el-menu-item index="1-1">
          <router-link to="/user/12345/张三丰">用户(张三丰)</router-link>
        </el-menu-item>
        <el-menu-item index="1-2">
          <router-link to="/user/54321/李清照">用户(李清照)</router-link>
        </el-menu-item>
    </el-sub-menu>
    <el-sub-menu index="2">
        <template #title>学生</template>
        <el-menu-item index="2-1">
          <router-link to="/student/9527/华安">学生(华安)</router-link>
        </el-menu-item>
        <el-menu-item index="2-2">
          <router-link to="/student/8526/秋香">学生(秋香)</router-link>
        </el-menu-item>
        <el-menu-item index="2-3">
          <router-link :to="{name:'student' , params: { id: 7456 , name: '石榴姐' }}">学生(石榴姐)</router-link>
        </el-menu-item>
    </el-sub-menu>
    <el-sub-menu index="3">
        <template #title>教师</template>
        <el-menu-item index="3-1">
          <router-link :to="{name:'teacher' , params: { id: 1122 , name: '张桂梅' }}">教师(张桂梅)</router-link>
        </el-menu-item>
        <el-menu-item index="3-2">
          <router-link :to="{name:'teacher' , params: { id: 2233 , name: '相爷' }}">教师(相爷)</router-link>
        </el-menu-item>
    </el-sub-menu>
    <el-menu-item index="4">
      <router-link :to="{name:'course' }">课程信息</router-link>
    </el-menu-item>
    <el-sub-menu index="5">
        <template #title>查询</template>
        <el-menu-item index="5-1">
          <router-link :to="{name:'search' , query:{ kw: 'kaifamiao' } }">查询1</router-link>
        </el-menu-item>
        <el-menu-item index="5-2">
          <router-link to="/search?kw=开发喵">查询2</router-link>
        </el-menu-item>
    </el-sub-menu>
    <el-sub-menu index="6">
        <template #title>动物</template>
        <el-menu-item index="6-1">
          <router-link :to="{ path: '/animal/lion' , query: { name : '辛巴' } }">狮子</router-link>
        </el-menu-item>
        <el-menu-item index="6-2">
          <router-link :to="{ path: '/animal/tiger' , query: { name : '虎妞' } }">老虎</router-link>
        </el-menu-item>
        <el-menu-item index="6-3">
          <router-link :to="{ name: 'tiger' , query: { name : '小虎仔' } }">小虎</router-link>
        </el-menu-item>
    </el-sub-menu>
  </el-menu>
</template>

<script>
export default {
    name: 'Header'
}
</script>

<style>

</style>